﻿using System;
using System.Data;
using System.Data.OleDb;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Bass.Tools;
using MySql.Data.MySqlClient;

public partial class notice_detail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        
        if (!IsPostBack)
        {
            //取到连接字符串
            string propertiesPath = Server.MapPath("mysqldb.properties");
            mytools mt = new mytools();
            string ConnString = mt.getMysqlConn(propertiesPath);

            //打开连接
            MySqlConnection myConnection = new MySqlConnection(ConnString);
            myConnection.Open();

            MySqlDataAdapter da = new MySqlDataAdapter("select * from notice_info where noticeid='" + Request.QueryString["noticeid"] + "'", myConnection);
            DataSet ds = new DataSet();
            da.Fill(ds, "notice_detail");
            DataRowView rowview = ds.Tables["notice_detail"].DefaultView[0];
            this.Label1.Text = rowview["title"].ToString();
            this.Label4.Text = rowview["content"].ToString();
            myConnection.Close();
        }
    }


}